From d201e5f2cc755dc29215843f79873e95b5135940 Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Sat, 20 Jan 2018 23:03:01 +0200
Subject: [PATCH xserver 1/8] modesettings needs dri2

Kernel modesettings support also depends on dri2, see
http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/drivers/modesetting/Makefile.am#n46

Patch sent upstream: https://bugs.freedesktop.org/show_bug.cgi?id=91584

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 2bfafb140..88d687d56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2064,7 +2064,7 @@ if test "x$XORG" = xyes; then
 	        XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS"
 	fi
 
-	if test "x$DRM" = xyes; then
+	if test "x$DRM" = xyes -a "x$DRI2" = xyes; then
 		dnl 2.4.46 is required for cursor hotspot support.
 		PKG_CHECK_EXISTS(libdrm >= 2.4.46, XORG_DRIVER_MODESETTING=yes, XORG_DRIVER_MODESETTING=no)
 	fi
-- 
2.16.1

